<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE">
    <title>Class: AreaTool</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
    <link type="text/css" rel="stylesheet" href="styles/custom.css">
    <!--[if lt IE 9]>
    <script src="scripts/html5shiv.min.js"></script>
    <script src="scripts/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<div style="position:fixed;top:0px;left:0px;"><h1 class="page-title">Class: AreaTool</h1></div>
<div id="main" style="margin-top:77px;">
    





<nav class="classnav scroll-styled">

    <h5><a href="#main" style="color:#000">class : AreaTool</a></h5>
    
        <h5>Members</h5>
        <ul>
        
            <li><a href="#options">options</a></li>
        
        </ul>
    

    

        
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        
        <h5>Methods</h5>
        <ul>
        
            
                <li><a class="inherit" href="#clear">
            
                clear</a></li>
        
            
                <li><a class="inherit" href="#getMeasureLayers">
            
                getMeasureLayers</a></li>
        
            
                <li><a class="inherit" href="#getLastMeasure">
            
                getLastMeasure</a></li>
        
            
                <li><a class="inherit" href="#getMode">
            
                getMode</a></li>
        
            
                <li><a class="inherit" href="#setMode">
            
                setMode</a></li>
        
            
                <li><a class="inherit" href="#getSymbol">
            
                getSymbol</a></li>
        
            
                <li><a class="inherit" href="#setSymbol">
            
                setSymbol</a></li>
        
            
                <li><a class="inherit" href="#getCurrentGeometry">
            
                getCurrentGeometry</a></li>
        
            
                <li><a class="inherit" href="#undo">
            
                undo</a></li>
        
            
                <li><a class="inherit" href="#redo">
            
                redo</a></li>
        
            
                <li><a class="inherit" href="#endDraw">
            
                endDraw</a></li>
        
            
                <li><a class="inherit" href="#addTo">
            
                addTo</a></li>
        
            
                <li><a class="inherit" href="#getMap">
            
                getMap</a></li>
        
            
                <li><a class="inherit" href="#enable">
            
                enable</a></li>
        
            
                <li><a class="inherit" href="#disable">
            
                disable</a></li>
        
            
                <li><a class="inherit" href="#isEnabled">
            
                isEnabled</a></li>
        
            
                <li><a class="inherit" href="#on">
            
                on</a></li>
        
            
                <li><a class="inherit" href="#addEventListener">
            
                addEventListener</a></li>
        
            
                <li><a class="inherit" href="#once">
            
                once</a></li>
        
            
                <li><a class="inherit" href="#off">
            
                off</a></li>
        
            
                <li><a class="inherit" href="#removeEventListener">
            
                removeEventListener</a></li>
        
            
                <li><a class="inherit" href="#listens">
            
                listens</a></li>
        
            
                <li><a class="inherit" href="#copyEventListeners">
            
                copyEventListeners</a></li>
        
            
                <li><a class="inherit" href="#fire">
            
                fire</a></li>
        
            
                <li><a class="inherit" href="#callInitHooks">
            
                callInitHooks</a></li>
        
            
                <li><a class="inherit" href="#setOptions">
            
                setOptions</a></li>
        
            
                <li><a class="inherit" href="#config">
            
                config</a></li>
        
            
                <li><a class="inherit" href="#onConfig">
            
                onConfig</a></li>
        
        </ul>
    

    
        <h5>Events</h5>
        <ul>
        
            <li><a href="#event:drawvertex">drawvertex</a></li>
        
            <li><a href="#event:drawstart">drawstart</a></li>
        
            <li><a href="#event:mousemove">mousemove</a></li>
        
            <li><a href="#event:drawend">drawend</a></li>
        
            <li><a href="#event:add">add</a></li>
        
            <li><a href="#event:enable">enable</a></li>
        
            <li><a href="#event:disable">disable</a></li>
        
            <li><a href="#event:remove">remove</a></li>
        
        </ul>
    
</nav>


<section class="classmain">
    


<header>
    
        <h2>AreaTool</h2>
        
            <div class="class-description">A map tool to help measure area on the map</div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    <!-- <h2>Constructor</h2> -->
    
    <h4 class="name" id="AreaTool"><span class="type-signature"></span>new <a href="#AreaTool">AreaTool</a><span class="signature">(options<span class="signature-attributes">opt</span>)</span>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/AreaTool.js#L50" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/AreaTool.js#L50" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#AreaTool" class="improvelink">[link]</a> -->
    </h4>

    
    





    <!--<h5>Example:</h5>-->
    
    
        <pre class="prettyprint"><code>var areaTool = new AreaTool({
    'once' : true,
    'symbol': {
      'lineColor' : '#34495e',
      'lineWidth' : 2
    },
    'vertexSymbol' : {
      'markerType'        : 'ellipse',
      'markerFill'        : '#1bbc9b',
      'markerLineColor'   : '#000',
      'markerLineWidth'   : 3,
      'markerWidth'       : 10,
     'markerHeight'      : 10
   },
   'language' : 'en-US'
 }).addTo(map);</code></pre>
    




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">options</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">construct options
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>language</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                    zh-CN
                
                </td>
            

            <td class="description last">language of the distance tool, zh-CN or en-US</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>metric</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last">display result in metric system</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>imperial</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last">display result in imperial system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>symbol</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">symbol of the line</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vertexSymbol</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">symbol of the vertice</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>labelOptions</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">construct options of the vertice labels.</td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->




    <h5>Extends:</h5>
    


    <ul>
        <li><a href="DistanceTool.html">DistanceTool</a></li>
    </ul>
















<h5>Fires:</h5>
<ul>
    <li><a href="#event:drawvertex">drawvertex</a></li>

    <li><a href="#event:drawstart">drawstart</a></li>

    <li><a href="#event:mousemove">mousemove</a></li>

    <li><a href="#event:drawend">drawend</a></li>

    <li><a href="#event:add">add</a></li>

    <li><a href="#event:enable">enable</a></li>

    <li><a href="#event:disable">disable</a></li>

    <li><a href="#event:remove">remove</a></li>
</ul>














<hr>
    
    </div>

    <!-- 
        <h3 class="subsection-title">Extends</h3>

        


    <ul>
        <li><a href="DistanceTool.html">DistanceTool</a></li>
    </ul>


     -->

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<li>
<h4 class="name" id="options"><span class="type-signature">(constant) </span>options<span class="type-signature"></span>

<!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/AreaTool.js#L16" class="improvelink">[help to improve]</a>
    
    <a href="#options" class="improvelink">[link]</a></h4> -->
</li>














    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">options</span>


            
            </td>



            

            <td class="description last">
                <h6>Properties</h6>

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>language</code>
                    
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            
                <td class="default">
                
                </td>
            

            <td class="description last">language of the distance tool, zh-CN or en-US</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>metric</code>
                    
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>



            
                <td class="default">
                
                </td>
            

            <td class="description last">display result in metric system</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>imperial</code>
                    
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>



            
                <td class="default">
                
                </td>
            

            <td class="description last">display result in imperial system.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>symbol</code>
                    
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>



            
                <td class="default">
                
                </td>
            

            <td class="description last">symbol of the line</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vertexSymbol</code>
                    
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>



            
                <td class="default">
                
                </td>
            

            <td class="description last">symbol of the vertice</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>labelOptions</code>
                    
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>



            
                <td class="default">
                
                </td>
            

            <td class="description last">construct options of the vertice labels.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mode</code>
                    
                        
                           <span class="signature-attributes">opt</span>
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">mode of the draw tool</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>once</code>
                    
                        
                           <span class="signature-attributes">opt</span>
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>



            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">whether disable immediately once drawn a geometry.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>autoPanAtEdge</code>
                    
                        
                           <span class="signature-attributes">opt</span>
                        
                        

                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>



            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last">Whether to make edge judgement or not.</td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    

    
    <dt class="tag-overrides">Overrides:</dt>
    <dd class="tag-overrides"><ul class="dummy"><li>
        <a href="DistanceTool.html#options">DistanceTool#options</a>
    </li></ul></dd>
    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/AreaTool.js">map/tool/AreaTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/AreaTool.js#L16">line 16</a>
        

    </li></ul></dd>
    

    

    

    
</dl>






<hr>
        
    

    
        

        
                    <h3 class="subsection-title">Methods</h3>
                
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="clear"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#clear">clear</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DistanceTool.js#L118" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DistanceTool.js#L118" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#clear" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Clear the measurements
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DistanceTool.html#clear">DistanceTool#clear</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="DistanceTool.html">DistanceTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="getMeasureLayers"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#getMeasureLayers">getMeasureLayers</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DistanceTool.js#L134" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DistanceTool.js#L134" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#getMeasureLayers" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Get the VectorLayers with the geometries drawn on the map during measuring.
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DistanceTool.html#getMeasureLayers">DistanceTool#getMeasureLayers</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">Array.&lt;<a href="Layer.html">Layer</a>></span>:

        


    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="getLastMeasure"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#getLastMeasure">getLastMeasure</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DistanceTool.js#L142" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DistanceTool.js#L142" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#getLastMeasure" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Get last measuring result
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DistanceTool.html#getLastMeasure">DistanceTool#getLastMeasure</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">Number</span>:

        


    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="getMode"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#getMode">getMode</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L116" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L116" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#getMode" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Get current mode of draw tool
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#getMode">DrawTool#getMode</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">String</span>:

        
<!-- <div class="param-desc"> -->
    mode
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="setMode"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#setMode">setMode</a><span class="signature">(mode)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L128" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L128" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#setMode" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Set mode of the draw tool
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>mode</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            <td class="description last">mode of the draw tool</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#setMode">DrawTool#setMode</a>
    </li></ul>
    





















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="getSymbol"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#getSymbol">getSymbol</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L149" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L149" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#getSymbol" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Get symbol of the draw tool
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#getSymbol">DrawTool#getSymbol</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">Object</span>:

        
<!-- <div class="param-desc"> -->
    symbol
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="setSymbol"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#setSymbol">setSymbol</a><span class="signature">(symbol)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L163" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L163" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#setSymbol" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Set draw tool's symbol
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>symbol</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last">symbol set</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#setSymbol">DrawTool#setSymbol</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="DrawTool.html">DrawTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="getCurrentGeometry"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#getCurrentGeometry">getCurrentGeometry</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L178" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L178" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#getCurrentGeometry" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Get geometry is currently drawing
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#getCurrentGeometry">DrawTool#getCurrentGeometry</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="Geometry.html">Geometry</a></span>:

        
<!-- <div class="param-desc"> -->
    geometry currently drawing
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="undo"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#undo">undo</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L220" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L220" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#undo" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Undo drawing, only applicable for click/dblclick mode
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#undo">DrawTool#undo</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="DrawTool.html">DrawTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="redo"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#redo">redo</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L235" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L235" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#redo" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Redo drawing, only applicable for click/dblclick mode
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#redo">DrawTool#redo</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="DrawTool.html">DrawTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="endDraw"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#endDraw">endDraw</a><span class="signature">(param<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L508" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L508" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#endDraw" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    End current draw
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>param</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">params of drawend event</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#endDraw">DrawTool#endDraw</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="DrawTool.html">DrawTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="addTo"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#addTo">addTo</a><span class="signature">(map)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L30" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L30" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#addTo" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Adds the map tool to a map.
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>map</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Map.html">Map</a></span>


            
            </td>

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#addTo">MapTool#addTo</a>
    </li></ul>
    











<h5>Fires:</h5>
<ul>
    <li><a href="#event:add">add</a></li>
</ul>









<h5>Returns:</h5>
<span class="type-signature"><a href="MapTool.html">MapTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="getMap"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#getMap">getMap</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L61" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L61" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#getMap" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Gets the map it added to.
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#getMap">MapTool#getMap</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="Map.html">Map</a></span>:

        
<!-- <div class="param-desc"> -->
    map
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="enable"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#enable">enable</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L70" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L70" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#enable" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Enable the map tool.
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#enable">MapTool#enable</a>
    </li></ul>
    











<h5>Fires:</h5>
<ul>
    <li><a href="#event:enable">enable</a></li>
</ul>









<h5>Returns:</h5>
<span class="type-signature"><a href="MapTool.html">MapTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="disable"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#disable">disable</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L99" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L99" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#disable" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Disable the map tool
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#disable">MapTool#disable</a>
    </li></ul>
    











<h5>Fires:</h5>
<ul>
    <li><a href="#event:disable">disable</a></li>
</ul>









<h5>Returns:</h5>
<span class="type-signature"><a href="MapTool.html">MapTool</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="isEnabled"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#isEnabled">isEnabled</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L124" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L124" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#isEnabled" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Returns whether the tool is enabled
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#isEnabled">MapTool#isEnabled</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">Boolean</span>:

        
<!-- <div class="param-desc"> -->
    true | false
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="on"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#on">on</a><span class="signature">(eventsOn, handler, context<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L11" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L11" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#on" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Register a handler function to be called whenever this event is fired.
</div>


    <!--<h5>Example:</h5>-->
    
    
        <pre class="prettyprint"><code>foo.on('mousedown mousemove mouseup', onMouseEvent, foo);</code></pre>
    




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventsOn</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">event types to register, seperated by space if more than one.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>handler</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">handler function to be called</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">the context of the handler</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.on">Eventable.on</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#on">MapTool#on</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">Any</span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="addEventListener"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#addEventListener">addEventListener</a><span class="signature">(eventTypes, handler, context<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L64" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L64" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#addEventListener" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Alias for <a href="Eventable.html#.on">on</a>
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventTypes</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">event types to register, seperated by space if more than one.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>handler</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">handler function to be called</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">the context of the handler</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.addEventListener">Eventable.addEventListener</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#addEventListener">MapTool#addEventListener</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="once"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#once">once</a><span class="signature">(eventTypes, handler, context<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L77" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L77" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#once" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Same as on, except the listener will only get fired once and then removed.
</div>


    <!--<h5>Example:</h5>-->
    
    
        <pre class="prettyprint"><code>foo.once('mousedown mousemove mouseup', onMouseEvent, foo);</code></pre>
    




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventTypes</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">event types to register, seperated by space if more than one.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>handler</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">listener handler</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">the context of the handler</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.once">Eventable.once</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#once">MapTool#once</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="off"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#off">off</a><span class="signature">(eventsOff, handler, context<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L105" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L105" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#off" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Unregister the event handler for the specified event types.
</div>


    <!--<h5>Example:</h5>-->
    
    
        <pre class="prettyprint"><code>foo.off('mousedown mousemove mouseup', onMouseEvent, foo);</code></pre>
    




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventsOff</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">event types to unregister, seperated by space if more than one.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>handler</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">listener handler</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">the context of the handler</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.off">Eventable.off</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#off">MapTool#off</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="removeEventListener"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#removeEventListener">removeEventListener</a><span class="signature">(eventTypes, handler, context<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L152" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L152" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#removeEventListener" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Alias for <a href="Eventable.html#.off">off</a>
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventTypes</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">event types to unregister, seperated by space if more than one.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>handler</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">listener handler</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">the context of the handler</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.removeEventListener">Eventable.removeEventListener</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#removeEventListener">MapTool#removeEventListener</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="listens"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#listens">listens</a><span class="signature">(eventType, hanlder<span class="signature-attributes">opt</span>, context<span class="signature-attributes">opt</span>)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L165" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L165" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#listens" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Returns listener's count registered for the event type.
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventType</code>
                
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="default">
                
                </td>
            

            <td class="description last">an event type</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>hanlder</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">listener function</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code>
                
                    
                        <span class="signature-attributes">opt</span>
                    
                    
                    
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">the context of the handler</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.listens">Eventable.listens</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#listens">MapTool#listens</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature">Number</span>:

        


    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="copyEventListeners"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#copyEventListeners">copyEventListeners</a><span class="signature">(target)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L206" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L206" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#copyEventListeners" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Copy all the event listener to the target object
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>target</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last">target object to copy to.</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.copyEventListeners">Eventable.copyEventListeners</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#copyEventListeners">MapTool#copyEventListeners</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="fire"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#fire">fire</a><span class="signature">(eventType, param)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L227" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Eventable.js#L227" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#fire" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Fire an event, causing all handlers for that event name to run.
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventType</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            <td class="description last">an event type to fire</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>param</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last">parameters for the listener function.</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->







    <h5>Mixes From:</h5>
    <ul><li>
        
            <a href="Eventable.html#.fire">Eventable.fire</a>
            
        
    </li></ul>



    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#fire">MapTool#fire</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="callInitHooks"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#callInitHooks">callInitHooks</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L53" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L53" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#callInitHooks" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Visit and call all the init hooks defined on Class and its parents.
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="Class.html#callInitHooks">Class#callInitHooks</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="Class.html">Class</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="setOptions"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#setOptions">setOptions</a><span class="signature">(options)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L64" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L64" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#setOptions" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Merges options with the default options of the object.
</div>




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last">options to set</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="Class.html#setOptions">Class#setOptions</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="Class.html">Class</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="config"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#config">config</a><span class="signature">(conf)</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L94" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L94" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#config" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    1. Return object's options if no parameter is provided. <br/>2. update an option and enable/disable the handler if a handler with the same name existed.
</div>


    <!--<h5>Example:</h5>-->
    
    
        <pre class="prettyprint"><code>// Get marker's options;var options = marker.config();// Set map's option "draggable" to false and disable map's draggable handler.map.config('draggable', false);// You can update more than one options like this:map.config({    'scrollWheelZoom' : false,    'doubleClickZoom' : false});</code></pre>
    




<!--  -->




    

<table class="params">
    <thead>
    <tr>
        
        <th>Parameter</th>
        
        <th>Type</th>

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>conf</code>
                
                </td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            <td class="description last">config to update</td>
        </tr>

    
    </tbody>
</table>



<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="Class.html#config">Class#config</a>
    </li></ul>
    



















<h5>Returns:</h5>
<span class="type-signature"><a href="Class.html">Class</a></span>:

        
<!-- <div class="param-desc"> -->
    this
<!-- </div> -->



    


<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="onConfig"><span class="type-signature"></span><i><span class="type-signature"> (inherited)  </span><a href="#onConfig">onConfig</a><span class="signature">()</span></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L129" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/core/Class.js#L129" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#onConfig" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    Default callback when config is called
</div>




<!--  -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="Class.html#onConfig">Class#onConfig</a>
    </li></ul>
    





















<hr>
        
    

    

    
        <h3 class="subsection-title">Events</h3>

        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:drawvertex"><i><span class="type-signature"> (inherited)  </span><a href="#event:drawvertex">drawvertex</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L359" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L359" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:drawvertex" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    drawvertex event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#event:drawvertex">DrawTool#event:drawvertex</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">drawvertex</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="DrawTool.html">DrawTool</a></span>


            
            </td>



            

            <td class="description last">draw tool</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometry</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


            
            </td>



            

            <td class="description last">geometry drawn</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coordinate</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Coordinate.html">Coordinate</a></span>


            
            </td>



            

            <td class="description last">coordinate of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>containerPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">container point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>viewPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">view point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>domEvent</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>



            

            <td class="description last">dom event</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="DrawTool.html#event:drawvertex">DrawTool#event:drawvertex</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js">map/tool/DrawTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L359">line 359</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:drawstart"><i><span class="type-signature"> (inherited)  </span><a href="#event:drawstart">drawstart</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L400" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L400" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:drawstart" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    drawstart event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#event:drawstart">DrawTool#event:drawstart</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">drawstart</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="DrawTool.html">DrawTool</a></span>


            
            </td>



            

            <td class="description last">draw tool</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coordinate</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Coordinate.html">Coordinate</a></span>


            
            </td>



            

            <td class="description last">coordinate of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>containerPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">container point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>viewPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">view point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>domEvent</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>



            

            <td class="description last">dom event</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="DrawTool.html#event:drawstart">DrawTool#event:drawstart</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js">map/tool/DrawTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L400">line 400</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:mousemove"><i><span class="type-signature"> (inherited)  </span><a href="#event:mousemove">mousemove</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L448" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L448" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:mousemove" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    mousemove event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#event:mousemove">DrawTool#event:mousemove</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">mousemove</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="DrawTool.html">DrawTool</a></span>


            
            </td>



            

            <td class="description last">draw tool</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometry</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


            
            </td>



            

            <td class="description last">geometry drawn</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coordinate</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Coordinate.html">Coordinate</a></span>


            
            </td>



            

            <td class="description last">coordinate of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>containerPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">container point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>viewPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">view point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>domEvent</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>



            

            <td class="description last">dom event</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="DrawTool.html#event:mousemove">DrawTool#event:mousemove</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js">map/tool/DrawTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L448">line 448</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:drawend"><i><span class="type-signature"> (inherited)  </span><a href="#event:drawend">drawend</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L517" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L517" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:drawend" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    drawend event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="DrawTool.html#event:drawend">DrawTool#event:drawend</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">drawend</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="DrawTool.html">DrawTool</a></span>


            
            </td>



            

            <td class="description last">draw tool</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometry</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


            
            </td>



            

            <td class="description last">geometry drawn</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coordinate</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Coordinate.html">Coordinate</a></span>


            
            </td>



            

            <td class="description last">coordinate of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>containerPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">container point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>viewPoint</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Point.html">Point</a></span>


            
            </td>



            

            <td class="description last">view point of the event</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>domEvent</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>



            

            <td class="description last">dom event</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="DrawTool.html#event:drawend">DrawTool#event:drawend</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js">map/tool/DrawTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/DrawTool.js#L517">line 517</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:add"><i><span class="type-signature"> (inherited)  </span><a href="#event:add">add</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L45" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L45" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:add" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    add event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#event:add">MapTool#event:add</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">add</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="MapTool.html">MapTool</a></span>


            
            </td>



            

            <td class="description last">map tool</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="MapTool.html#event:add">MapTool#event:add</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js">map/tool/MapTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L45">line 45</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:enable"><i><span class="type-signature"> (inherited)  </span><a href="#event:enable">enable</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L82" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L82" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:enable" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    enable event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#event:enable">MapTool#event:enable</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">enable</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="MapTool.html">MapTool</a></span>


            
            </td>



            

            <td class="description last">map tool</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="MapTool.html#event:enable">MapTool#event:enable</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js">map/tool/MapTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L82">line 82</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:disable"><i><span class="type-signature"> (inherited)  </span><a href="#event:disable">disable</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L108" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L108" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:disable" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    disable event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#event:disable">MapTool#event:disable</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">disable</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="MapTool.html">MapTool</a></span>


            
            </td>



            

            <td class="description last">map tool</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="MapTool.html#event:disable">MapTool#event:disable</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js">map/tool/MapTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L108">line 108</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
            

    <!-- <h2>Constructor</h2> -->
    
    <li>
    
    <h4 class="name" id="event:remove"><i><span class="type-signature"> (inherited)  </span><a href="#event:remove">remove</a></i>
    
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L140" class="improvelink">[source]</a>
        
    
    <!-- 
        <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L140" class="improvelink">[help to improve]</a>
     -->
    <!-- <a href="#event:remove" class="improvelink">[link]</a> -->
    </h4>

    
    </li>
    
    




<div class="description">
    remove event.
</div>




<!-- 
    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Object</span>


        </li>
    </ul>
 -->





<!-- event properties -->









    <h5>Inherited From:</h5>    
    <ul><li>
        <a href="MapTool.html#event:remove">MapTool#event:remove</a>
    </li></ul>
    




    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>



        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>



            

            <td class="description last">remove</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code>
                    
                </td>
            

            <td class="type">
            
                
<span class="param-type"><a href="MapTool.html">MapTool</a></span>


            
            </td>



            

            <td class="description last">map tool</td>
        </tr>

    
    </tbody>
</table>



<dl class="details">

    

    

    
    <dt class="inherited-from">Inherited From:</dt>
    <dd class="inherited-from"><ul class="dummy"><li>
        <a href="MapTool.html#event:remove">MapTool#event:remove</a>
    </li></ul></dd>
    

    

    

        

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        
            <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js">map/tool/MapTool.js</a>, <a target="_blank" href="https://github.com/maptalks/maptalks.js/tree/master/src/map/tool/MapTool.js#L140">line 140</a>
        

    </li></ul></dd>
    

    

    

    
</dl>



















<hr>
        
    
</article>

</section>




</div>

<nav class="page-nav">
    <h2><a href="index.html">V0.47.0</a></h2><h4>Classes</h4><ul></ul><h5>Map</h5><ul><li><a href="Map.html">Map</a></li></ul><h5>Layer</h5><ul><li><a href="Layer.html">Layer</a></li><li><a href="TileSystem.html">TileSystem</a></li><li><a href="TileLayer.html">TileLayer</a></li><li><a href="GroupTileLayer.html">GroupTileLayer</a></li><li><a href="WMSTileLayer.html">WMSTileLayer</a></li><li><a href="OverlayLayer.html">OverlayLayer</a></li><li><a href="VectorLayer.html">VectorLayer</a></li><li><a href="CanvasLayer.html">CanvasLayer</a></li><li><a href="ParticleLayer.html">ParticleLayer</a></li><li><a href="ImageLayer.html">ImageLayer</a></li></ul><h5>Geometry</h5><ul><li><a href="Geometry.html">Geometry</a></li><li><a href="Path.html">Path</a></li><li><a href="Marker.html">Marker</a></li><li><a href="TextMarker.html">TextMarker</a></li><li><a href="Label.html">Label</a></li><li><a href="TextBox.html">TextBox</a></li><li><a href="Polygon.html">Polygon</a></li><li><a href="LineString.html">LineString</a></li><li><a href="Curve.html">Curve</a></li><li><a href="ArcCurve.html">ArcCurve</a></li><li><a href="QuadBezierCurve.html">QuadBezierCurve</a></li><li><a href="CubicBezierCurve.html">CubicBezierCurve</a></li><li><a href="ConnectorLine.html">ConnectorLine</a></li><li><a href="ArcConnectorLine.html">ArcConnectorLine</a></li><li><a href="Ellipse.html">Ellipse</a></li><li><a href="Circle.html">Circle</a></li><li><a href="Sector.html">Sector</a></li><li><a href="Rectangle.html">Rectangle</a></li><li><a href="GeometryCollection.html">GeometryCollection</a></li><li><a href="MultiGeometry.html">MultiGeometry</a></li><li><a href="MultiPoint.html">MultiPoint</a></li><li><a href="MultiLineString.html">MultiLineString</a></li><li><a href="MultiPolygon.html">MultiPolygon</a></li><li><a href="GeoJSON.html">GeoJSON</a></li><li><a href="GeometryEditor.html">GeometryEditor</a></li></ul><h5>Basic types</h5><ul><li><a href="Coordinate.html">Coordinate</a></li><li><a href="Extent.html">Extent</a></li><li><a href="Point.html">Point</a></li><li><a href="PointExtent.html">PointExtent</a></li><li><a href="Position.html">Position</a></li><li><a href="Size.html">Size</a></li></ul><h5>Maptool</h5><ul><li><a href="MapTool.html">MapTool</a></li><li><a href="DrawTool.html">DrawTool</a></li><li><a href="DistanceTool.html">DistanceTool</a></li><li><a href="AreaTool.html">AreaTool</a></li></ul><h5>Ui</h5><ul><li><a href="ui.UIComponent.html">ui.UIComponent</a></li><li><a href="ui.UIMarker.html">ui.UIMarker</a></li><li><a href="ui.InfoWindow.html">ui.InfoWindow</a></li><li><a href="ui.ToolTip.html">ui.ToolTip</a></li><li><a href="ui.Menu.html">ui.Menu</a></li></ul><h5>Control</h5><ul><li><a href="control.Control.html">control.Control</a></li><li><a href="control.Zoom.html">control.Zoom</a></li><li><a href="control.LayerSwitcher.html">control.LayerSwitcher</a></li><li><a href="control.Attribution.html">control.Attribution</a></li><li><a href="control.Scale.html">control.Scale</a></li><li><a href="control.Panel.html">control.Panel</a></li><li><a href="control.Toolbar.html">control.Toolbar</a></li><li><a href="control.Overview.html">control.Overview</a></li></ul><h5>Core</h5><ul><li><a href="Ajax.html">Ajax</a></li><li><a href="Class.html">Class</a></li><li><a href="MapboxUtil.html">MapboxUtil</a></li><li><a href="Util.html">Util</a></li><li><a href="DomUtil.html">DomUtil</a></li><li><a href="StringUtil.html">StringUtil</a></li></ul><h5>Animation</h5><ul><li><a href="animation.Easing.html">animation.Easing</a></li><li><a href="animation.Frame.html">animation.Frame</a></li><li><a href="animation.Player.html">animation.Player</a></li><li><a href="animation.Animation.html">animation.Animation</a></li></ul><h5>Geo</h5><ul><li><a href="CRS.html">CRS</a></li><li><a href="measurer.Identity.html">measurer.Identity</a></li><li><a href="measurer.DEFAULT.html">measurer.DEFAULT</a></li><li><a href="measurer.Measurer.html">measurer.Measurer</a></li><li><a href="measurer.WGS84Sphere.html">measurer.WGS84Sphere</a></li><li><a href="measurer.BaiduSphere.html">measurer.BaiduSphere</a></li><li><a href="projection.DEFAULT.html">projection.DEFAULT</a></li><li><a href="projection.BAIDU.html">projection.BAIDU</a></li><li><a href="projection.EPSG3857.html">projection.EPSG3857</a></li><li><a href="projection.EPSG4326.html">projection.EPSG4326</a></li><li><a href="projection.EPSG4490.html">projection.EPSG4490</a></li><li><a href="projection.IDENTITY.html">projection.IDENTITY</a></li><li><a href="Transformation.html">Transformation</a></li></ul><h5>Handler</h5><ul><li><a href="Handler.html">Handler</a></li><li><a href="DragHandler.html">DragHandler</a></li></ul><h5>Other</h5><ul><li><a href="renderer.CanvasRenderer.html">renderer.CanvasRenderer</a></li></ul><h4>Namespaces</h4><ul><li><a href="measurer.html">measurer</a></li><li><a href="projection.html">projection</a></li><li><a href="renderer.html">renderer</a></li></ul><h4>Mixins</h4><ul><li><a href="Eventable.html">Eventable</a></li><li><a href="JSONAble.html">JSONAble</a></li><li><a href="measurer.Common.html">measurer.Common</a></li><li><a href="projection.Common.html">projection.Common</a></li><li><a href="Handlerable.html">Handlerable</a></li><li><a href="CenterMixin.html">CenterMixin</a></li><li><a href="TextEditable.html">TextEditable</a></li><li><a href="Renderable.html">Renderable</a></li><li><a href="ui.Menuable.html">ui.Menuable</a></li></ul><h3>Global</h3><ul><li><a href="global.html#INTERNAL_LAYER_PREFIX">INTERNAL_LAYER_PREFIX</a></li><li><a href="global.html#RESOURCE_PROPERTIES">RESOURCE_PROPERTIES</a></li><li><a href="global.html#RESOURCE_SIZE_PROPERTIES">RESOURCE_SIZE_PROPERTIES</a></li><li><a href="global.html#NUMERICAL_PROPERTIES">NUMERICAL_PROPERTIES</a></li><li><a href="global.html#COLOR_PROPERTIES">COLOR_PROPERTIES</a></li><li><a href="global.html#getListeningEvents">getListeningEvents</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#IS_NODE">IS_NODE</a></li><li><a href="global.html#identity">identity</a></li><li><a href="global.html#copy">copy</a></li><li><a href="global.html#set">set</a></li><li><a href="global.html#add">add</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#length">length</a></li><li><a href="global.html#normalize">normalize</a></li><li><a href="global.html#dot">dot</a></li><li><a href="global.html#scale">scale</a></li><li><a href="global.html#cross">cross</a></li><li><a href="global.html#distance">distance</a></li><li><a href="global.html#transformMat4">transformMat4</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Feb 18 2020 16:21:06 GMT+0800 (GMT+08:00)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>

</body>
</html>